const getRows = (req, res) => {
    let list = [];
    for(let i=1;i<11;i++){
        list.push({
            "deviceId": "BHWL0012108260001",
            "productId": "测试产品001",
            "productName": "测试产品001",
            "funcName": "设备保活",
            "identifier": "Server_KeepAlive",
            "logTime": '2021-02-21',
            "deviceName": "测试设备0001",
            "funcType": 3,
            "logOperate": "设备保活[Server_KeepAlive]",
            "logContent": "{\"header\":{\"version\":30000,\"sign\":10,\"signDesc\":\"设备向服务器发送保活\"},\"params\":{\"identifier\":\"Server_KeepAlive\"}}"
        });
    }
    list.reverse();

    res.json ({
        success:true,
        errorCode:null,
        errorMessage:null,
        data:{
            rows:list,
            total:10
            
        },
        ts:1653544105
    })
}

export default {
    'GET /api/monitor/list':getRows,
    'GET /api/monitor/1':{
        success:true,
        errorCode:null,
        errorMessage:null,
        data:{
            "deviceId": "BHWL0012108260001",
            "productId": "测试产品001",
            "funcName": "设备保活",
            "identifier": "Server_KeepAlive",
            "logTime": 1650878049907,
            "deviceName": "测试设备0001",
            "funcType": 3,
            "logOperate": "设备保活[Server_KeepAlive]",
            "logContent": "{\"header\":{\"version\":30000,\"sign\":10,\"signDesc\":\"设备向服务器发送保活\"},\"params\":{\"identifier\":\"Server_KeepAlive\"}}"
        
        },
        ts:1653544105
    },
    'POST /api/monitor':{
        success:true,
        errorCode:null,
        errorMessage:null,
        data:null,
        ts:1653544105
    },
    'PUT /api/monitor/1':{
        success:true,
        errorCode:null,
        errorMessage:null,
        data:null,
        ts:1653544105
    },
    'DELETE /api/monitor/1':{
        success:true,
        errorCode:null,
        errorMessage:null,
        data:null,
        ts:1653544105
    },
    'PUT /api/monitor/1/status/1':{
        success:true,
        errorCode:null,
        errorMessage:null,
        data:null,
        ts:1653544105
    },
}
